//
//  ZaiXianFuDaoVC.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/4/19.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "ZaiXianFuDaoVC.h"
#import "ZXFDCreateClassView.h"
#import "ClassDetailViewController.h"
#import "CJYearMonthSelectedView.h"
#import "SYPlayerViewController.h"
#import "RYChatViewController.h"
#import "RYChatBaseView.h"

#import "SYZXFDFuDaoDetailsView.h"
#import "SYBaiBanFuDaoViewController.h"


//#import "SYInteractionViewController.h"
//#import "SYVideoListViewController.h"
//#import "SYScreenViewController.h"


@interface ZaiXianFuDaoVC ()<ZaiXianFuDaoNavViewDelegate,LeaveForClassDetailViewDelegate,ClassDetailViewControllerDelegate,ComplateLeaveForClassDetailViewDelegate>
{
    CGFloat mainw;
    int currentPage;
    NSString *_bjId;
}
@property (nonatomic, assign) BOOL Type;
@property (nonatomic, strong) ZXFDCreateClassView *createClassView;
@property (nonatomic, strong) ClassDetailViewController *classDetailView;
@property (nonatomic, strong) FuDaoShiPingGuanKanJiLuView *fuDaoGuanKanJiLuView;
@property (nonatomic, copy) NSString *riqi;
@property (nonatomic, copy) NSString *finsh;//表示是已完成还是未完成
//@property (nonatomic, strong) SYVideoListViewController *videoListVC;


@end

@implementation ZaiXianFuDaoVC
- (void)viewWillAppear:(BOOL)animated{
   // [self requestDataIsFinished:@""];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}
- (void)initSubView{
    currentPage = 0;
    mainw  = MAINW;
    _Type = YES;
    self.riqi = @"";
    self.finsh = @"0";
    _vcArray = [NSMutableArray new];
    [self.view addSubview:self.navView];
    _navView.mainw = mainw;
    [_navView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@0);
        make.right.equalTo(@0);
        make.top.equalTo(@0);
        make.height.equalTo(@44);
    }];
    [self addNotice];
    
    [self.view addSubview:self.leftView.view];
    [_leftView.view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@0);
        make.right.equalTo(@0);
        make.top.equalTo(@44);
        make.bottom.equalTo(@0);
    }];
    [_vcArray addObject:self.leftView];
    [_vcArray addObject:self.rightView];
//    [_mainScrollView addSubview:self.leftView.view];
//    [_mainScrollView addSubview:self.rightView.view];
    [self requestDataIsFinished:@""];
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(dismissChuangJianBanJi) name:@"ZaiXianFuDaoTianJiaXueShengView" object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(requestDataList) name:@"SYInteractionViewControllerNotification" object:nil];
    
    
}

- (void)requestDataList {
    [NSObject executeRunloop:^{
        [self requestDataIsFinished:@"0"];
    } afterDelay:0.3];
    
}

- (void)requestDataIsFinished:(NSString *)finis {
    
    
    [MBProgressHUD mj_showMessage:nil toView:self.view];
    
    [SYRequestAPI fd_requestClassListClassId:@"0" date:self.riqi keyWord:@"" ifFinished:finis success:^(NSMutableArray *listArr) {
        [MBProgressHUD mj_hideHUDForView:self.view];
        if ([finis isEqualToString:@"0"]) {
            [self.leftView requestData:listArr];
        } else {
            [self.rightView requestData:listArr];
        }
        
    } fail:^(NSError *error) {
        [MBProgressHUD mj_hideHUDForView:self.view];
        
        if ([finis isEqualToString:@"0"]) {
            [self.leftView requestData:[NSMutableArray array]];
        } else {
            [self.rightView requestData:[NSMutableArray array]];
        }
    }];
}


- (ZaiXianFuDaoNavView *)navView{
    if (!_navView) {
        ZaiXianFuDaoNavView *view = [[ZaiXianFuDaoNavView alloc]initWithFrame:CGRectMake(0, 0, MAINW-150, 44) andArray:@[@"未完成",@"已完成"]];
        view.backgroundColor = MAINBACKCOLOR;
        view.delegate = self;
        _navView = view;
    }
    return _navView;
}
- (ZXFDWWCView *)leftView{
    if (!_leftView) {
        UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];
        ZXFDWWCView *view = [[ZXFDWWCView alloc]initWithCollectionViewLayout:layout];
        view.view.frame = CGRectMake(0, 0, mainw, APP_HEIGHT-84);
        view.Type = self.Type;
        view.delegate = self;
        _leftView = view;
    }
    return _leftView;
}
- (ZXFDYWCView *)rightView{
    if (!_rightView) {
        UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];
        ZXFDYWCView *view = [[ZXFDYWCView alloc]initWithCollectionViewLayout:layout];
        view.view.frame = CGRectMake(mainw, 0, mainw, APP_HEIGHT-84);
        view.Type = self.Type;
        view.delegate = self;
        _rightView = view;
    }
    return _rightView;
}
-(void)addNotice{
//    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(changeView:) name:@"ChangeCellSpaNotice" object:nil];
}
- (void)back{
    
}
- (void)riQiSelected{
    __weak typeof(self) weakSelf = self;
    [CJYearMonthSelectedView showDatePickerWithTitle:@"选择月份" minDateStr:@"2000-01" resultBlock:^(NSString *selectValue) {
        if ([selectValue isEqualToString:@"全部"]) {
            selectValue = @"";
            weakSelf.navView.timeButton.bottomLabel.text = @"全部";
        } else {
            weakSelf.navView.timeButton.bottomLabel.text = selectValue;
        }
        //选择完成后的操作
        //NSArray *array = [selectValue componentsSeparatedByString:@"-"];//
        weakSelf.riqi = selectValue;
        
        [weakSelf requestDataIsFinished:weakSelf.finsh];
        //        [];
    }];
}
- (void)scrollViewChangeButtom:(int)index{
    currentPage = index;
    self.finsh = SJStringWithFormat(index);
//    self.mainScrollView.contentOffset = CGPointMake(mainw*index, 0);
    for (int i = 0; i<_vcArray.count; i++) {
        UICollectionViewController *vc = (UICollectionViewController *)_vcArray[i];
        if (i == index) {
            [self.view addSubview:vc.view];
            [vc.view mas_makeConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(@0);
                make.right.equalTo(@0);
                make.top.equalTo(@44);
                make.bottom.equalTo(@0);
            }];
        }else{
            [vc.view removeFromSuperview];
        }
    }
    [self requestDataIsFinished:SJStringWithFormat(index)];
}
//- (void)changeView:(NSNotification *)info{
//    BOOL type = [[info.userInfo objectForKey:@"Type"] intValue];
//    self.Type = !type;
//    mainw = [PublickFunctionObject currentScreenSize:type];
//    NSLog(@"大小 %f",mainw);
//    _navView.mainw = mainw;
//    [_navView uploadLayout];
//    
//    _mainScrollView.frame = CGRectMake(0, 44, mainw, APP_HEIGHT-84);
//    _mainScrollView.contentOffset = CGPointMake(currentPage*mainw, 0);
//    _leftView.view.frame = CGRectMake(0, 0, mainw, APP_HEIGHT-84);
//    _leftView.Type = self.Type;
//    [_leftView.collectionView reloadData];
//    
//    _rightView.view.frame = CGRectMake(mainw, 0, mainw, APP_HEIGHT-84);
//    _rightView.Type = self.Type;
//    [_rightView.collectionView reloadData];
//    
//    _createClassView.frame = CGRectMake(0, 0, mainw+20, self.view.frame.size.height);
//    _createClassView.keShiXuanZeView.view.frame = CGRectMake(0, 0, mainw+20, self.view.frame.size.height);
//    [_createClassView.keShiXuanZeView.tableList reloadData];
////    _createClassView.keShiXuanZeView.xueShengView.frame = CGRectMake(0, 0, mainw+20, self.view.frame.size.height);
////    [_createClassView.keShiXuanZeView.xueShengView.tableView reloadData];
//    
//    _classDetailView.frame = CGRectMake(0, 0, mainw+20, self.view.frame.size.height);
//    [_classDetailView.tableView reloadData];
//    
//    _fuDaoGuanKanJiLuView.frame = CGRectMake(0, 0, mainw+20, self.view.frame.size.height);
//    _fuDaoGuanKanJiLuView.mainScrollView.frame = CGRectMake(mainw/2-250, 44, 500, self.view.frame.size.height-44);
//    
//}
//- (UIScrollView *)mainScrollView{
//    if (!_mainScrollView) {
//        UIScrollView *view = [[UIScrollView alloc]init];
//        view.frame = CGRectMake(0, 44, MAINW, APP_HEIGHT-84);
//        view.contentSize = CGSizeMake(MAINW*2, 0);
//        view.showsHorizontalScrollIndicator = YES;
//        view.showsVerticalScrollIndicator = NO;
//        view.pagingEnabled = YES;
//        view.scrollEnabled = NO;
//        view.backgroundColor = MAINBACKCOLOR;
//        _mainScrollView = view;
//    }
//    return _mainScrollView;
//}
- (void)dismissChuangJianBanJi{
//    [self requestDataIsFinished:@"0"];
    
    [UIView animateWithDuration:0.5 animations:^{
        self->_createClassView.frame = CGRectMake(0, self.view.frame.size.width,self.view.frame.size.width,self.view.frame.size.height);
    } completion:^(BOOL finished) {
        [self->_createClassView removeFromSuperview];
        [self requestDataIsFinished:@"0"];
    }];
}
#pragma mark - 创建班级
- (void)nianJiSelected{
    NSLog(@"创建班级");
    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    _createClassView = [[ZXFDCreateClassView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    _createClassView.frame = CGRectMake(mainw, 0, self.view.frame.size.width, self.view.frame.size.height);
    _createClassView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:_createClassView];
    [_createClassView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@0);
        make.right.equalTo(@0);
        make.top.equalTo(@0);
        make.bottom.equalTo(@0);
    }];
//    [UIView animateWithDuration:0.5 animations:^{
//        self->_createClassView.frame = CGRectMake(0, 0,self.view.frame.size.width,self.view.frame.size.height);
//    } completion:^(BOOL finished) {
        [MBProgressHUD hideHUDForView:self.view animated:YES];
//    }];
}
- (void)dealloc{
    [[NSNotificationCenter defaultCenter]removeObserver:self name:@"ChangeCellSpaNotice" object:nil];
     [[NSNotificationCenter defaultCenter]removeObserver:self name:@"ZaiXianFuDaoTianJiaXueShengView" object:nil];
    [[NSNotificationCenter defaultCenter] removeObserver:self];
    
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.view endEditing:YES];
}
#pragma mark - 前往班级详情
- (void)LeaveForClassDetailView:(id)obj{
    SYZaiXianFuDaoModel *zxfd = (SYZaiXianFuDaoModel *)obj;

    if ([zxfd.tutorType intValue] == 2) {//单聊
        RYChatViewController *_conversationVC = [[RYChatViewController alloc]init];
        _conversationVC.conversationType = ConversationType_PRIVATE;
        _conversationVC.targetId = zxfd.rongGroupId;
        _conversationVC.title = zxfd.rongGroupId;
        _conversationVC.typeName = zxfd.typeName;
        _conversationVC.className = zxfd.className;
        _conversationVC.classStyle = zxfd.isFinished;
        _conversationVC.classId = zxfd.fdid;
        _conversationVC.IsFrom = @"1";
        _conversationVC.refrshListViewInfo = ^{
            [self requestDataIsFinished:@"0"];
            [self requestDataIsFinished:@"1"];
        };
        [self.view addSubview:_conversationVC.view];
        [self addChildViewController:_conversationVC];
        [_conversationVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@0);
            make.right.equalTo(@0);
            make.top.equalTo(@-20);
            make.bottom.equalTo(@0);
        }];
    }else if ([zxfd.tutorType intValue] == 1){//群聊
        //TOP 群聊
        
        RYChatViewController *_conversationVC = [[RYChatViewController alloc]init];
        _conversationVC.conversationType = ConversationType_GROUP;
        _conversationVC.targetId = zxfd.rongGroupId;
        _conversationVC.title = zxfd.rongGroupId;
        _conversationVC.typeName = zxfd.typeName;
        _conversationVC.className = zxfd.className;
        _conversationVC.classStyle = zxfd.isFinished;
        _conversationVC.classId = zxfd.fdid;
        _conversationVC.IsFrom = @"1";
        
        _conversationVC.refrshListViewInfo = ^{
            [self requestDataIsFinished:@"0"];
            [self requestDataIsFinished:@"1"];
        };
//        _conversationVC.view.frame = CGRectMake(mainw, 0, self.view.frame.size.width, self.view.frame.size.height-20);
//        _conversationVC.view.frame = CGRectMake(mainw, 0, self.view.frame.size.width, APP_HEIGHT-20);
        [self.view addSubview:_conversationVC.view];
        [self addChildViewController:_conversationVC];
        [_conversationVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@0);
            make.right.equalTo(@0);
            make.top.equalTo(@-20);
            make.bottom.equalTo(@0);
        }];
        
        
//        //TOP 录制视频列表
//        _videoListVC = [[SYVideoListViewController alloc] init];
//        [self.view addSubview:_videoListVC.view];
//        [self addChildViewController:_videoListVC];
//        [_videoListVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.left.equalTo(@0);
//            make.right.equalTo(@0);
//            make.top.equalTo(@-20);
//            make.bottom.equalTo(@0);
//        }];
       
        //TOP
        //创建单独白板
//
//        [MBProgressHUD mj_showLoadingInView:self.view];
//        [SYRequestAPI bb_TutorServiceImInfoToken:Token success:^(id  _Nonnull dataList) {
//            //这里需要房间号，名字，登录账号（生成的）
//            [MBProgressHUD mj_hideHUDForView:self.view];
//            SYScreenViewController *interactionVC = [[SYScreenViewController alloc] init];
//            //TOP 先写死
//            SaveDataToNSUserDefaults([dataList nilObjectForKey:@"imId"], @"independence_ios");
//            interactionVC.userName = [dataList nilObjectForKey:@"imId"];
//            interactionVC.userSig = [dataList nilObjectForKey:@"userSig"];
//            NSInteger room = arc4random() %100;
//            interactionVC.roomId = SJStringWithFormat(room);
//            interactionVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
//            [self presentViewController:interactionVC animated:YES completion:nil];
//
//        } fail:^(NSError *error) {
//            [MBProgressHUD mj_hideHUDForView:self.view];
//            [MBProgressHUD zr_showError:error.domain];
//            //            YLSLog(@"----请求错误");
//        }];
        

//        [self.navigationController pushViewController:_conversationVC animated:YES];
    }else if ([zxfd.tutorType intValue] == 0){
        

//        SYZXFDFuDaoDetailsView *detailsView = [[NSBundle mainBundle] loadNibNamed:@"SYZXFDFuDaoDetailsView" owner:nil options:nil].firstObject;
//        [detailsView requestDataClassId:zxfd.fdid];
//        [self.view addSubview:detailsView];
//        [detailsView mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.left.equalTo(@0);
//            make.right.equalTo(@0);
//            make.top.equalTo(@-20);
//            make.bottom.equalTo(@0);
//        }];
        
        
        // 白板辅导

        [MBProgressHUD mj_showLoadingInView:self.view];
        [SYRequestAPI bb_TutorServiceImInfoToken:Token success:^(id  _Nonnull dataList) {
            //这里需要房间号，名字，登录账号（生成的）
            [MBProgressHUD mj_hideHUDForView:self.view];
            //TOP 白板跳转1.0

            
            SYBaiBanFuDaoViewController *interactionVC = [[SYBaiBanFuDaoViewController alloc] init];
            interactionVC.roomId = zxfd.tencentRoomID;
            interactionVC.tecentRoom = zxfd.tencentRoom;
            interactionVC.userName = [dataList nilObjectForKey:@"imId"];
            interactionVC.userSig = [dataList nilObjectForKey:@"userSig"];
            interactionVC.imId = [dataList nilObjectForKey:@"imId"];
            interactionVC.fdbId = zxfd.fdid;
            interactionVC.accountId = zxfd.accountId;
            interactionVC.tutorRecordName = zxfd.tutorRecordName.length >0?zxfd.tutorRecordName:zxfd.title;
            interactionVC.tutorRecordId = zxfd.tutorRecordId;
            interactionVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
            [self presentViewController:interactionVC animated:YES completion:nil];
        } fail:^(NSError *error) {
            [MBProgressHUD mj_hideHUDForView:self.view];
            [MBProgressHUD zr_showError:error.domain];
//            YLSLog(@"----请求错误");
        }];
 
        
        
//        SYPlayerViewController *playerVC = [[SYPlayerViewController alloc] init];
//        playerVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
//        playerVC.urlStr = @"https://1256468886.vod2.myqcloud.com/840e6e58vodcq1256468886/227b6a015285890794707389863/zjMmbBYqJ4sA.mov";
//        [self presentViewController:playerVC animated:YES completion:nil];
        
        
//
        
        /*
>>>>>>> BaiBan
        _classDetailView = [[ClassDetailViewController alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
        _classDetailView.frame = CGRectMake(mainw, 0, self.view.frame.size.width, self.view.frame.size.height);
        _classDetailView.mainDelegate = self;
        _classDetailView.backgroundColor = [UIColor whiteColor];
        [self.view addSubview:_classDetailView];
        [_classDetailView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@0);
            make.right.equalTo(@0);
            make.top.equalTo(@0);
            make.bottom.equalTo(@0);
        }];
        //    [UIView animateWithDuration:0.5 animations:^{
        //        self->_classDetailView.frame = CGRectMake(0, 0,self.view.frame.size.width,self.view.frame.size.height);
        //    } completion:^(BOOL finished) {
        //        [MBProgressHUD hideHUDForView:self.view animated:YES];
        [self.classDetailView requestDataClassId:zxfd.fdid];
<<<<<<< HEAD
        
=======
         */

    } else if ([zxfd.tutorType intValue] == 100) {//删除
        [MBProgressHUD mj_showMessage:@"正在删除" toView:self.view];
        [SYRequestAPI fd_postTutorClassDeleteTutorId:zxfd.fdid success:^(BOOL isSuccess) {
            [MBProgressHUD mj_hideHUDForView:self.view];
            [MBProgressHUD mj_showSuccess:@"删除成功" toView:self.view];
            [NSObject executeRunloop:^{
                [self requestDataIsFinished:@"0"];
            } afterDelay:1];
            
        } fail:^(NSError *error) {
            [MBProgressHUD mj_hideHUDForView:self.view];
        }];
        
        
    } else {//修改
        
    }

//    _classDetailView = [[ClassDetailViewController alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
//    _classDetailView.frame = CGRectMake(mainw, 0, self.view.frame.size.width, self.view.frame.size.height);
//    _classDetailView.mainDelegate = self;
//    _classDetailView.backgroundColor = [UIColor whiteColor];
//   
//    [self.view addSubview:_classDetailView];
//    [_classDetailView mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.equalTo(@0);
//        make.right.equalTo(@0);
//        make.top.equalTo(@0);
//        make.bottom.equalTo(@0);
//    }];
////    [UIView animateWithDuration:0.5 animations:^{
////        self->_classDetailView.frame = CGRectMake(0, 0,self.view.frame.size.width,self.view.frame.size.height);
////    } completion:^(BOOL finished) {
////        [MBProgressHUD hideHUDForView:self.view animated:YES];
//         [self.classDetailView requestDataClassId:zxfd.fdid];
//    }];
}
- (void)complateLeaveForClassDetailView:(id)indexPath{
//    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
//    [MBProgressHUD mj_showMessage:nil toView:self.view];
    
    SYZaiXianFuDaoModel *zxfd = (SYZaiXianFuDaoModel *)indexPath;
    
    if ([zxfd.tutorType intValue] == 2 || [zxfd.tutorType intValue] == 1) {//单聊
        [self LeaveForClassDetailView:indexPath];
    } else {//互动课堂
        _classDetailView = [[ClassDetailViewController alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
        _classDetailView.frame = CGRectMake(mainw, 0, self.view.frame.size.width, self.view.frame.size.height);
        _classDetailView.isDetails = YES;
        _classDetailView.mainDelegate = self;
        _classDetailView.backgroundColor = [UIColor whiteColor];
        [self.view addSubview:_classDetailView];
        [_classDetailView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@0);
            make.right.equalTo(@0);
            make.top.equalTo(@0);
            make.bottom.equalTo(@0);
        }];
            [UIView animateWithDuration:0.5 animations:^{
                self->_classDetailView.frame = CGRectMake(0, 0,self.view.frame.size.width,self.view.frame.size.height);
            } completion:^(BOOL finished) {
                [self.classDetailView requestDataClassId:zxfd.fdid];
            }];
             
        

    }
    
    
    
}
- (void)lookImageClick:(id)indexPath{
    NSLog(@"查看记录");
    NSString *classId = (NSString *)indexPath;
    _fuDaoGuanKanJiLuView = [[FuDaoShiPingGuanKanJiLuView alloc]initWithFrame:CGRectMake(mainw, 0, self.view.frame.size.width, self.view.frame.size.height)];
    _fuDaoGuanKanJiLuView.backgroundColor = [UIColor whiteColor];
    _fuDaoGuanKanJiLuView.vc = self;
    [_fuDaoGuanKanJiLuView requestClassId:classId];
    [self.view addSubview:_fuDaoGuanKanJiLuView];
    [_fuDaoGuanKanJiLuView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@0);
        make.right.equalTo(@0);
        make.top.equalTo(@0);
        make.bottom.equalTo(@0);
    }];
//    [UIView animateWithDuration:0.5 animations:^{
//        self->_fuDaoGuanKanJiLuView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
//    } completion:^(BOOL finished) {
//
//    }];
}
- (void)videoImageClick:(id)indexPath{
    NSString *path = (NSString *)indexPath;
    if (path.length == 0) {
        [MBProgressHUD zr_showError:@"暂无视频"];
        return;
    }
    SYPlayerViewController *playerVC = [[SYPlayerViewController alloc] init];
    playerVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
    playerVC.urlStr = path;
    
    [self presentViewController:playerVC animated:YES completion:nil];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
